package com.housekeeping.dao;

import com.housekeeping.model.Review;

import java.util.List;

/**
 * 评价数据访问接口
 */
public interface ReviewDAO {
    
    Review findById(Integer reviewId);
    
    List<Review> findAll();
    
    Review findByOrderId(Integer orderId);
    
    List<Review> findByServiceId(Integer serviceId);
    
    List<Review> findByStaffId(Integer staffId);
    
    List<Review> findByUserId(Integer userId);
    
    List<Review> findByRating(Integer rating);
    
    Double getAverageRatingByServiceId(Integer serviceId);
    
    Double getAverageRatingByStaffId(Integer staffId);
    
    long countByServiceId(Integer serviceId);
    
    long countByStaffId(Integer staffId);
    
    int insert(Review review);
    
    int update(Review review);
    
    int delete(Integer reviewId);
    
    long count();
    
    boolean isOrderReviewed(Integer orderId);
} 